package org.linphone.sub.utils;

/**
 * Created by Xiang on 2018/3/23.
 */
//TODO 应该走枚举
public class StateUtil {

	//状态码转中文
	public static String intToString(String str){
		switch (str){
			case "0":
				return "离线";
			case "1":
				return "空闲";
			case "2":
				return "背景音乐播放中...";
			case "3":
				return "分站间电话中...";
			case "4":
				return "分站间广播中...";
			case "5":
				return "主控分站通话中...";
			case "6":
				return "服务广播中...";
		}

		return "0.0";
	}

	//中文转状态码
	public static int stringToInt(String str){
		switch (str){
			case "离线":
				return 0;
			case "空闲":
				return 1;
			case "背景音乐播放中...":
				return 2;
			case "分站间电话中...":
				return 3;
			case "分站间广播中...":
				return 4;
			case "主控分站通话中...":
				return 5;
			case "服务广播中...":
				return 6;
		}

		return -1;
	}

}
